10 INPUT "Enter Date: MM,DD,YYYY: ", MONTH, DAY, YEAR
15 GOSUB 1000
20 PRINT MID$("SunMonTueWedThuFriSat",(DOW*3)+1,3),DOW
30 GOTO 10
1000 IF (MONTH<3) THEN Y=YEAR-1:M=MONTH+12:D=DAY
1010 IF MONTH>=3 THEN Y=YEAR:M=MONTH:D=DAY
1020 DOW=((13*M+3)\5+D+Y+Y\4-Y\100+Y\400+1) MOD 7
1030 RETURN

